export class APIManager {
  /**
   * 获取用户股价信息
   */
  static async getGoodsList(
    params: Record<string, any>
  ): Promise<{ status: boolean; data: Record<string, any> }> {
    const res = await fetch(
      `https://tesths.whxcs.com/api/goodPriceLog/lists?keyword=${params.keyword}&page_no=${params.page_no}&page_size=${params.page_size}&sign=Yyr2yD0AMCgz5Bb8ebeeIFKyDWbE0wPV61qI4xYD5rBcf8URBidIcWBYBzDyr7cK`
    ).then((r) => {
      if (r.status == 200) {
        try {
          return r.json();
        } catch {
          return r.text();
        }
      } else {
        return r;
      }
    });

    const response = { status: false, data: {} };
    if (res.code == 1) {
      response.status = true;
      response.data = res.data;
    }
    return response;
  }


}
